import request from '@/utils/request'

// 查询参数列表
export function getOrgDetail(query) {
  return request({
    url: '/org/queryOrgDetail',
    method: 'get',
    params: query
  })
}

// 查询参数列表
export function getDetail(query) {
  return request({
    url: '/org/queryDetail',
    method: 'get',
    params: query
  })
}

// 查询机构列表
export function queryOrg(query) {
  return request({
    url: '/org/queryOrg',
    method: 'get',
    params: query
  })
}
// 查询处级列表
export function queryOfficeOrg(query) {
  return request({
    url: '/org/queryOfficeOrg',
    method: 'get',
    params: query
  })
}
// 查询人员列表
export function queryAllPeople(query) {
  return request({
    url: '/org/queryOrgPeopleDetail',
    method: 'get',
    params: query
  })
}

//获取随机id
export function getSnowFlakeId(query) {
  return request({
    url: '/plan/getSnowFlakeId',
    method: 'get',
    params: query
  })
}

//保存人员编制调整
export function savePersonChange(data) {
  return request({
    url: '/plan/tempSaveChange',
    method: 'post',
    data: data
  })
}

//重置
export function resetPlan(tempVersionId){
  return request({
    url: '/plan/reset/' + tempVersionId,
    method: 'delete',
  })
}

// 根据orgId查询同级的部门
export function getSameLevelOrg(orgId){
  return request({
    url: '/org/getSameLevelOrg/' + orgId,
    method: 'get',
  })
}
